package com.gaga.metadata.model;


import com.gaga.metadata.driver.SqlServerDriver;
import com.gaga.metadata.entity.database.DataBaseTable;

public class SqlServerModelFactory {
    public static AbstractDbModelProvider modelProvider(SqlServerDriver driver, DataBaseTable table) {

        AbstractDbModelProvider tableModelProvider = null;

        switch (table.getDdlType()) {
            case SELECT:
                tableModelProvider = new SqlServerSelectProvider();
                break;
            default:
                tableModelProvider = new SqlServerCreateTableProvider();
                break;
        }

        tableModelProvider.init(driver);
        return tableModelProvider;
    }
}
